﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 校园管理系统
{
    class Student : Person
    {
        //特有属性：专业（Major）、年级（Grade）
        private string _major;
        private int _grade;

        public string Major { get => _major; set => _major = value; }
        public int Grade { get => _grade; set => _grade = value; }
        public void GetMeg()
        {
            Console.WriteLine("我是{0}，编号为{1}，是个{2}生，身份证号为{3}，专业为{4}，就读年级{5}，联系方式：{6}"
                , base.Name, base.Id, base.Sex, base.Cardid, this.Major, this.Grade, base.Tel);

        }

        public Student(int id, string name, char sex, long cardid, string tel, string major, int grade)
            : base(id, name, sex, cardid, tel)
        {
            this.Major = major;
            this.Grade = grade;
        }

    }
}
